package com.itfreer.gis.map.style.entity;

import java.io.Serializable;
import com.itfreer.form.api.entity.EntityBase;
import com.itfreer.form.api.reflect.DictionaryField;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Transient;

/**
 * 定义样式数据源实体
 */
@Entity(name = "gis_map_style_source")
public class MapStyleSourceEntity extends EntityBase implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@Id
	@Column(name = "id", length = 50, nullable = false)
	private String id;

	/**
	 * 数据源中文名称
	 */
	@Column(name = "s_cname", length = 50, nullable = true)
	private String cname;

	/**
	 * 数据源类型
	 */
	@Column(name = "s_type", length = 50, nullable = true)
	@DictionaryField(dictionaryName = "d_data_source_type", toFieldName = "typeName")
	private String type;

	@Transient
	private String typeName;

	/**
	 * 数据源服务器类型
	 */
	@Column(name = "s_server_type", length = 50, nullable = true)
	@DictionaryField(dictionaryName = "d_souce_server_type", toFieldName = "serverTypeName")
	private String serverType;

	@Transient
	private String serverTypeName;

	/**
	 * 服务名称
	 */
	@Column(name = "s_service", length = 50, nullable = true)
	@DictionaryField(dictionaryName = "g_custom_service_config", toFieldName = "serviceName")
	private String service;

	@Transient
	private String serviceName;

	/**
	 * 数据源名称
	 */
	@Column(name = "s_name", length = 255, nullable = true)
	private String name;

	/**
	 * 属性值
	 */
	@Column(name = "s_propertys", nullable = true, columnDefinition = "text")
	private String propertys;

	/**
	 * 外键
	 */
	@Column(name = "s_style_id", length = 50, nullable = true)
	private String styleId;

	/**
	 * 排序
	 */
	@Column(name = "i_order", length = 8, nullable = true)
	private Integer order;

	/**
	 * 是否可查询
	 */
	@Column(name = "b_cansearch", nullable = true)
	private Boolean canSearch;
	/**
	 * 是否可编辑
	 */
	@Column(name = "b_canedit", nullable = true)
	private Boolean canEdit;
	/**
	 * 源数据id
	 */
	@Column(name = "s_metedata", length = 50, nullable = true)
	private String metedata;
	
	/**
	 * 租户ID
	 */
	@Column(name = "s_tenantid", length = 50, nullable = true)
	private String tenantID;

	/**
	 * 租户名称
	 */
	@Column(name = "s_tenantname", length = 50, nullable = true)
	private String tenantName;

	/**
	 * id
	 */
	public String getId() {
		return id;
	}

	/**
	 * id
	 */
	public void setId(String value) {
		this.id = value;
	}

	@Transient
	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public String getCname() {
		return cname;
	}

	public void setCname(String cname) {
		this.cname = cname;
	}

	/**
	 * 数据源类型
	 */
	public String getType() {
		return type;
	}

	/**
	 * 数据源类型
	 */
	public void setType(String value) {
		this.type = value;
	}

	/**
	 * 数据源标识
	 */
	public String getName() {
		return name;
	}

	/**
	 * 数据源标识
	 */
	public void setName(String value) {
		this.name = value;
	}

	public String getServerType() {
		return serverType;
	}

	public void setServerType(String serverType) {
		this.serverType = serverType;
	}

	@Transient
	public String getServerTypeName() {
		return serverTypeName;
	}

	public void setServerTypeName(String serverTypeName) {
		this.serverTypeName = serverTypeName;
	}

	/**
	 * 属性值
	 */
	public String getPropertys() {
		return propertys;
	}

	/**
	 * 属性值
	 */
	public void setPropertys(String value) {
		this.propertys = value;
	}

	public String getStyleId() {
		return styleId;
	}

	public void setStyleId(String styleId) {
		this.styleId = styleId;
	}

	public Integer getOrder() {
		return order;
	}

	public void setOrder(Integer order) {
		this.order = order;
	}

	public Boolean getCanSearch() {
		return canSearch;
	}

	public void setCanSearch(Boolean canSearch) {
		this.canSearch = canSearch;
	}

	public Boolean getCanEdit() {
		return canEdit;
	}

	public void setCanEdit(Boolean canEdit) {
		this.canEdit = canEdit;
	}

	public String getMetedata() {
		return metedata;
	}

	public void setMetedata(String metedata) {
		this.metedata = metedata;
	}
	
	public String getTenantID() {
		return tenantID;
	}

	public void setTenantID(String tenantID) {
		this.tenantID = tenantID;
	}

	public String getTenantName() {
		return tenantName;
	}

	public void setTenantName(String tenantName) {
		this.tenantName = tenantName;
	}

	public String getService() {
		return service;
	}

	public void setService(String service) {
		this.service = service;
	}

	@Transient
	public String getServiceName() {
		return serviceName;
	}

	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}
}
